1. Field of the Invention
The present invention relates generally to database replication, and more particularly, to a database replication method and system that works across different database platforms.
2. Description of the Related Art
Database replication is the process of copying and maintaining data on multiple servers. Database replication solutions may be provided by the database software providers or by third parties. An article by Charles Thomson entitled, “Database Replication” discusses database replication solutions offered by Microsoft Corp., Oracle Corp. and Sybase Inc.
MySQL AB also provides a database replication solution for use with its MySQL® database software. With this solution, data written to a master server is replicated on one or more slave servers. The master server writes updates to its binary logs, and the binary logs serve as a record of updates to be sent to the slave servers. When a slave server connects to the master server, it informs the master of its last position within the logs since the last successful update. The slave catches up on any updates that have occurred since that time and then waits for the master to notify it of new updates.
In each of the database replication solutions discussed above, database replication is being performed across the same database platform. They cannot perform database replication in hybrid database configurations, where the source database server runs one type of database software and the destination database server runs a different type of database software.
Hybrid database configurations are sometimes used to take advantage of the benefits offered by the different types of database software. For example, the MySQL® database offers speed, ease of use, low maintenance and low cost, while the Oracle® database is commonly used to handle complex database tasks and high volumes of data. When a particular application requires handling of both small and large data volumes, both the MySQL® database and the Oracle® database might be used. In such a case, all new data and data updates would be entered directly into the MySQL® database and maintained there for a period of time for quick access and then purged thereafter. The Oracle® database, by contrast, would collect all data and be used for applications like downstream reporting and other complex database tasks. This hybrid configuration would be desirable, because the MySQL® database performs well with small amounts of data while the Oracle® database performs well with large amounts of data and provides additional features, such as the ability to distribute the data by doing partitions, clusters, etc.
As noted previously, current database replication solutions are not applicable to hybrid database configurations. One way to replicate data in a hybrid database configuration would be to pass data updates in parallel to the different databases. This technique, however, is not desirable, because: (1) it requires more time in completing the data updates; and (2) it is difficult to keep the different databases fully synchronized. Also, a failure in storing the data updates in parallel would likely cause data inconsistency and cause the data in the different databases to be out of sync.